package com.bocai;

public enum ResponseCode {
	SUCCESS(200, "Success"),
	REQUEST_PARAM_ERROR(301, "Request Param Error"),
	NO_CHANGE(304, "Content Unchanged"),
	REQUEST_ERROR(400, "Request Error"),
	AUTH_REQUIRED(401,"Missing Auth Fields"),
	AUTH_FAILED(402,"Signature Verification Failure"),
	AUTH_REJECT(403, "Request Rejected/Unauthorized"),
	SERVICE_NOT_FOUND(404, "Service Not Found"),
	VER_NOT_FOUND(405, "Version Not Found"),
	SERVICE_UNAVAILABLE(406, "Service Unavailable"),
	SERVER_ERROR(500, "Internal Server Error"),
	NO_DATA(204, "No Data Return"),	
	
	// 注册返回码
	CHECK_MOBILE_ERROR(50001, "检测号码失败"),
	REGISTER_FAILURE(50002, "注册失败"),
	REGISTERED(50003, "号码已被注册"),
	// 登录返回码
	LOGIN_ERROR(50021, "登录失败"),
	LOGIN_FAILED(50022, "用户名或者密码错误"),
	NOT_LOGIN(50023, "用户未登录"),
	;
	private int value;
	private String desc;
	
	private ResponseCode(int value, String desc) {
		this.value = value;
		this.desc = desc;
	}

	public int getValue() {
		return value;
	}

	public String getDesc() {
		return desc;
	}
}
